#include <qwt_plot_curve.h>
#include "graph.h"

ColoredCurve::ColoredCurve(const QString &title): QwtPlotCurve(title){
	setRenderHint(QwtPlotItem::RenderAntialiased);
	setStyle(QwtPlotCurve::Lines);
}

void ColoredCurve::setColor(const QColor &color) {
	QColor c = color;
	c.setAlpha(255);

	setPen(c);
	 // setBrush(c);
}

Graph::Graph() {
	curve = new ColoredCurve("");
}
Graph::~Graph() {
	delete curve;
}
void Graph::updateData() {
	curve->setRawData( dates.data(), vals.data(), vals.size() );
}
